<?php	
	require '../utils/conn.php';
	include_once '../models/set.php';
	
	$title = $_REQUEST['title'];
	
	$set = new Set();
	$set->setName($title);
	$set->setTimestamp(time());
	$query = "INSERT INTO t_set(s_name, s_timestamp)" . " VALUES('$set->name','$set->timestamp')";
	$result = mysql_query($query) or die("insert set failed：". mysql_error());
	$set->setId = mysql_insert_id();
	echo $set->setId;
?>